package cn.levill.domain.strategy.service;

import cn.levill.domain.strategy.model.valobj.StrategyAwardStockKeyVO;

/**
 * @author Levill
 * @description 抽奖库存相关服务，获取库存消耗队列
 * @date 2025/02/11 23:55
 */
public interface IRaffleStock {

    /**
     * 获取奖品库存消耗队列
     *
     * @return {@link StrategyAwardStockKeyVO } 奖品库存Key信息
     * @throws InterruptedException 中断异常
     */
    StrategyAwardStockKeyVO takeQueueValue()throws InterruptedException;

    /**
     * 更新奖品库存消耗记录
     *
     * @param strategyId 策略 ID
     * @param awardId    奖励 ID
     */
    void updateStrategyAwardStock(Long strategyId, Integer awardId);
}
